Elegant Powers | Asian Pacific Mathematical Olympiad 2012 Problem 3